<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<!-- page-helper -->

<body>
<div th:fragment="page" class="u-page"  style="margin-bottom:30px;">
    <div class="u-right">
        共有 <b class="org" th:text="${pageInfo.total}"></b> 条记录　　
        共 <span th:text="${pageInfo.pages}"></span> 页
        <ul id="yw1" class="yiiPager">
            <li th:unless="${pageInfo.isFirstPage}" class="first">
                <a th:href="@{${currentLink}+'page=1'}">首页</a>
            </li>
            <li th:if="${pageInfo.hasPreviousPage}" class="previous">
                <a th:href="@{${currentLink}+'page='+${pageInfo.pageNum > 1 ? pageInfo.pageNum - 1 : 1 }}">上一页</a>
            </li>

            <span th:each="curNum : ${pageInfo.navigatepageNums}">
            <li class="page" th:class="${curNum == pageInfo.pageNum} ? 'selected' : ''">
                <a th:href="@{${currentLink}+'page='+${curNum}}" th:text="${curNum}"></a>
            </li>
            </span>

            <li th:if="${pageInfo.hasNextPage}" class="next">
                <a th:href="@{${currentLink}+'page='+${pageInfo.pages>pageInfo.pageNum ? pageInfo.pageNum + 1 : pageInfo.pages }}">下一页</a>
            </li>
            <li th:unless="${pageInfo.isLastPage}" class="last">
                <a th:href="@{${currentLink}+'page='+${pageInfo.pages}}">末页</a>
            </li>
        </ul>
    </div>
    <div class="u-clear"></div>
</div>
</body>
</html>
